<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    .box-a {
      width: 200px;
      height: 200px;
      border: 1px solid #ccc;
      position: absolute;
      top: 200px;
      left: 50%;
      transform: translateX(-50%);
    }
    .box-b {
      width: 200px;
      height: 200px;
      border: 1px solid blue;
    }
    .box {
      width: 200px;
      height: 200px;
      border: 1px solid blue;
      position: absolute;
      top: 800px;
      left: 50%;
      transform: translateX(-50%);
    }
    .box-c {
      width: 150px;
      height: 150px;
      border: 1px solid orange;
    }
    .box-d {
      margin: 100px auto;
      width: 200px;
      height: 200px;
      border: 1px solid red;
    }
    .tooltip {
      padding: 10px 15px;
      border: 1px solid #ccc;
      border-radius: 4px;
    }
    .box1 {
      height: 100%;
      width: 100%;
      position: absolute;
      left: 0;
      top: 10px;
    }
  </style>
  <body>
    <script src="./popper.js"></script>
    <div class="box-a"></div>
    <div class="box">
      <div class="box1">
        <div class="tooltip">tooltip</div>
      </div>
    </div>
  </body>
  <script>
    let boxD = document.querySelector(".box-a");
    let toolTip = document.querySelector(".tooltip");
    new Popper(boxD, toolTip, {
      placement: "top",
    });
  </script>
</html>
